using System;
using System.Collections.Generic;
using System.Text;
using Iivil.Infrastructure.Logging;

namespace Iivil.Infrastructure.Logging.Providers {
    public class DebugLogProvider : ILogWriter{
        #region ILogWriter Members

        public void WriteLogEntry(Severity severity, string category, string formatMessage, params object[] arg) {
            WriteLogEntry(severity, category, String.Format(formatMessage, arg));
        }

        public void WriteLogEntry(Severity severity, string category, string message) {

                StringBuilder sb = new StringBuilder(DateTime.Now.ToShortTimeString() + '\t');
                sb.Append(severity.ToString());
                sb.Append('\t');
                sb.Append(category);
                sb.Append('\t');
                sb.Append(message);
                System.Diagnostics.Debug.WriteLine(sb.ToString());
           
        }

        #endregion

        #region IDisposable Members

        public void Dispose() {
            return;
        }

        #endregion
    }
}
